home *** CD-ROM | disk | FTP | other *** search
- #define STRICT
-
- // Includes standard Windows
- #include <windows.h>
- #include <windowsx.h>
- #include <time.h>
- #include <stdlib.h>
- #include <malloc.h>
- #include <memory.h>
- #include <stdio.h>
-
- // Includes D3D
- #define D3D_OVERLOADS
- #include <ddraw.h>
- #include <d3d.h>
- #include <d3dx.h>
-
- // Includes utilitaires D3D
- #include "d3dmath.h"
- #include "d3dutil.h"
- #include "D3DEnum.h"
-
- // Ids Resources
- #include "resource.h"
-
- // Constantes
- #include "const.h"
-
- // Types
- #include "types.h"
-
- // Variables globales projet
- #include "vars.h"
-
- // Prototypes fonctions autres modules
- #include "proto.h"
-
- // Macros
- #include "macros.h"
-
- LRESULT CALLBACK LogoWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
- {
- switch( uMsg )
- {
- case WM_LBUTTONDOWN:
- case WM_MBUTTONDOWN:
- case WM_RBUTTONDOWN:
- case WM_CHAR:
- DestroyWindow( hWnd );
- return 0;
- }
- return DefWindowProc( hWnd, uMsg, wParam, lParam );
- }
-
- void vLogo(void)
- {
- HBITMAP bmLogo;
- HDC hdcLogo;
- HWND hWndLogo, hWndText;
- WNDCLASS wcLogo;
- HGDIOBJ hold;
- RECT rRectangle;
- HDC hdcWork;
-
- // Récupérer les dimensions de l'écran
- hdcWork = GetDC(NULL);
- int iX = GetDeviceCaps(hdcWork, HORZRES),
- iY = GetDeviceCaps(hdcWork, VERTRES);
- ReleaseDC(NULL, hdcWork);
-
- // Charger l'image du logo
- bmLogo = (HBITMAP) LoadImage(hInst, "logo.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
-
- wcLogo.style = CS_SAVEBITS | CS_NOCLOSE;
- wcLogo.lpfnWndProc = (WNDPROC)LogoWndProc;
- wcLogo.cbClsExtra = 0;
- wcLogo.cbWndExtra = 0;
- wcLogo.hInstance = hInst;
- wcLogo.hIcon = NULL;
- wcLogo.hCursor = LoadCursor(NULL, IDC_ARROW);
- wcLogo.hbrBackground = (HBRUSH)(COLOR_WINDOW);
- wcLogo.lpszMenuName = NULL;
- wcLogo.lpszClassName = sLogo;
- RegisterClass(&wcLogo);
-
- hWndLogo = CreateWindowEx(WS_EX_TOPMOST, sLogo,
- NULL,
- WS_POPUP | WS_VISIBLE | WS_DLGFRAME,
- iX / 2 - (522 / 2), iY / 2 - (261 / 2), 522, 261,
- NULL, NULL, hInst, NULL);
-
- if (!hWndLogo) return;
-
- // Ajouter la listbox à la fenêtre logo
- GetClientRect(hWndLogo, &rRectangle);
- hWndText = CreateWindow("LISTBOX",
- NULL,
- WS_DISABLED | WS_THICKFRAME | WS_CHILD | WS_VSCROLL | WS_VISIBLE,
- rRectangle.left + 259, rRectangle.top, rRectangle.right - 260, rRectangle.bottom+2,
- hWndLogo, NULL, hInst, NULL);
-
- // Sortir le texte about
- SendMessage(hWndText, LB_ADDSTRING, 0, (LPARAM) (LPCSTR) "Sculpt \"RenderGirl\" Direct3D");
- SendMessage(hWndText, LB_ADDSTRING, 0, (LPARAM) (LPCSTR) "Avec des petits bouts de code dedans !!");
- SendMessage(hWndText, LB_ADDSTRING, 0, (LPARAM) (LPCSTR) "** Best browzed wiz a Greuh-force **");
- SendMessage(hWndText, LB_ADDSTRING, 0, (LPARAM) (LPCSTR) "Un sous-clone de l'inimitable & parfait");
- SendMessage(hWndText, LB_ADDSTRING, 0, (LPARAM) (LPCSTR) "Sculpt 3D (1987) pour Amiga (1985)");
- SendMessage(hWndText, LB_ADDSTRING, 0, (LPARAM) (LPCSTR) "En hommage à BYTE by BYTE");
- SendMessage(hWndText, LB_ADDSTRING, 0, (LPARAM) (LPCSTR) "Et pour le fun du code DX7/D3Dim");
- SendMessage(hWndText, LB_ADDSTRING, 0, (LPARAM) (LPCSTR) "Code : Sgueu");
- SendMessage(hWndText, LB_ADDSTRING, 0, (LPARAM) (LPCSTR) "Code additionnel : Tox Teapot'Rahan");
- SendMessage(hWndText, LB_ADDSTRING, 0, (LPARAM) (LPCSTR) "Idées : Greuh-nouil (comme d'hab)");
- SendMessage(hWndText, LB_ADDSTRING, 0, (LPARAM) (LPCSTR) "Support : Yeyel Kidz Kat Janal Droid");
- SendMessage(hWndText, LB_ADDSTRING, 0, (LPARAM) (LPCSTR) "Bugs : Sub'zzzZZZzzzzZZzzz... Paf !");
- SendMessage(hWndText, LB_ADDSTRING, 0, (LPARAM) (LPCSTR) "Greets : Yoyo, Jojo, CdBS");
- SendMessage(hWndText, LB_ADDSTRING, 0, (LPARAM) (LPCSTR) "Game & lame : Willy Go Cake !");
-
- hdcWork = GetDC(hWndLogo);
- hdcLogo = CreateCompatibleDC(hdcWork);
- hold = SelectObject(hdcLogo, bmLogo);
-
- BitBlt(hdcWork,0, 0, 256, 256, hdcLogo, 0, 0, SRCCOPY);
-
- ShowWindow(hWndLogo, SW_SHOW);
- UpdateWindow(hWndLogo);
-
- SelectObject(hdcLogo, hold);
- DeleteDC(hdcLogo);
- ReleaseDC(hWndLogo, hdcWork);
-
- UnregisterClass(sLogo, hInst);
-
- DeleteObject(bmLogo);
- }
-